package com.yanmaohu.yulia.statement;

/**
 * @author Bright Lee
 */
public final class CommitStatement implements SqlTransactionStatement, Statement {

    private int beginIndex;
    private int endIndex;
    private boolean work;
    private boolean andChain;
    private boolean andNoChain;

    public CommitStatement(int beginIndex, int endIndex, boolean work, boolean andChain, boolean andNoChain) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.work = work;
        this.andChain = andChain;
        this.andNoChain = andNoChain;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public boolean isWork() {
        return work;
    }

    public boolean isAndChain() {
        return andChain;
    }

    public boolean isAndNoChain() {
        return andNoChain;
    }

}
